Skip to content

Instantly share code, notes, and snippets.

@artemgetmann
artemgetmann / claude-code-token-saving-guide.md
Last active March 9, 2026 19:46
Practical workflow for reducing token usage in Claude Code while preserving session continuity. Includes compacting strategies, CLAUDE.md structure, modular context management, and prompt engineering tips.

🧠 How to Save Context Tokens When Using Claude Code

This is a personal reference workflow for minimizing token usage while maintaining project continuity across Claude Code (Sonnet 4 with file access).


βœ… Setup: Populate CLAUDE.md

Claude loads CLAUDE.md automatically at session start.

@t3dotgg
t3dotgg / try-catch.ts
Last active March 9, 2026 19:46
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@adhishthite
adhishthite / autoexp-generic.md
Created March 7, 2026 21:28
autoexp β€” Autonomous Experimentation Loop. Generalized from Karpathy's autoresearch for any quantifiable metric project.

autoexp β€” Autonomous Experimentation Loop

Generalized from Karpathy's autoresearch. Same loop, any domain.


The Idea

An AI agent runs an infinite hill-climbing loop: modify β†’ run β†’ measure β†’ keep or revert β†’ repeat. No human in the loop. Wake up to a TSV of completed experiments.

@sudoingX
sudoingX / qwen3.5_chat_template.jinja
Created March 7, 2026 11:57
Patched Jinja template for Qwen 3.5 27B - fixes developer role crash + preserves thinking mode (thinking = 1). Drop-in replacement for agent tools (OpenCode, Claude Code, Continue, Cursor, Aider). Without this patch, --chat-template chatml silently kills thinking mode.
{%- set image_count = namespace(value=0) %}
{%- set video_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain images.') }}
@MickeWHR
MickeWHR / wake-up-light-alarm-with-sunrise-effect.yaml
Last active March 9, 2026 19:43 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up Light Alarm
description: >
Wake-up Light with sunrise effect.
Uses modern Kelvin scale (e.g., 2200K to 4000K) where low is warm and high is cold.
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off manually will cancel the sunrise.

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W

Feature Implementation Workflow

Task: $ARGUMENTS


Setup

  1. Derive a kebab-case slug from the task description (e.g., "rename an SD" β†’ rename-sd)
  2. Create and checkout git branch: {slug}
@jfanals
jfanals / README.md
Last active March 9, 2026 19:38
Pi coding agent extensions: DeepWiki, Perplexity Search & Google Search (grounded web research tools)

Pi Extensions: DeepWiki, Perplexity Search & Google Search

Three pi coding agent extensions that add web research tools with custom TUI rendering.

Features

All three tools include custom renderCall / renderResult methods so that:

  • The full query is always visible β€” never truncated, even for long questions
  • The query persists after the answer arrives β€” shown in the tool call header
@aravindanve
aravindanve / bypass-disable-devtool.md
Last active March 9, 2026 19:38
Bypass disable-devtool

(Working as of 2025-02-09)

There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.

Opening devtools

If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.

@tomoima525
tomoima525 / settings.json
Last active March 9, 2026 19:38
settings.json for Cursor(VSCode)
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"explorer.confirmDelete": false,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 120,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnType": true,
"peacock.favoriteColors": [